package com.ruoyi.quartz.util;

import com.getui.push.v2.sdk.ApiHelper;
import com.getui.push.v2.sdk.GtApiConfiguration;
import com.getui.push.v2.sdk.api.PushApi;

public class GetuiUtils {

    private static String appId="qwmKgfV1whAZJWdo4DwasA";
    private static String appKey="A8bLgt5RDO7nLSrPpwEtL3";
    private static String masterSecret="i9dvznSAkBAlKxDluRZVv1";
    private static String domain="https://restapi.getui.com/v2/";


  /*  private static String appId="rcDSqVBi9z897oEWRJzm8A";
    private static String appKey="ZmAfvFJvXp9KTp4MTlzUu6";
    private static String masterSecret="lAkDq915Gz8CnRUrQ3T187";
    private static String domain="https://restapi.getui.com/v2/";
*/
   /* AppID：rcDSqVBi9z897oEWRJzm8A

    AppKey：ZmAfvFJvXp9KTp4MTlzUu6

    AppSecret：AAljYGV2Qh9qLoasUt79K4

    MasterSecret：lAkDq915Gz8CnRUrQ3T187*/

    public static PushApi getPushApi() {
            // 设置httpClient最大连接数，当并发较大时建议调大此参数。或者启动参数加上 -Dhttp.maxConnections=200
            System.setProperty("http.maxConnections", "200");
            GtApiConfiguration apiConfiguration = new GtApiConfiguration();
            //填写应用配置
            apiConfiguration.setAppId(appId);
            apiConfiguration.setAppKey(appKey);
            apiConfiguration.setMasterSecret(masterSecret);
            // 接口调用前缀，请查看文档: 接口调用规范 -> 接口前缀, 可不填写appId
            apiConfiguration.setDomain(domain);
            // 实例化ApiHelper对象，用于创建接口对象
            ApiHelper apiHelper = ApiHelper.build(apiConfiguration);
            // 创建对象，建议复用。目前有PushApi、StatisticApi、UserApi
            PushApi pushApi = apiHelper.creatApi(PushApi.class);
            return pushApi;
        }

}
